import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/components/Main'
import Home from '@/components/pages/Home'
import Select from '@/components/pages/Select'
import Msg from '@/components/pages/Msg'
import Order from '@/components/pages/Order'
import A from '@/components/A'


Vue.use(Router)

export default new Router({
  //mode:'history', //否则打包后index.html没有内容

  routes: [
    {
          path: '/work/a',
          name: 'A',
          component: A
    },
    {
      path: '/',
      name: 'Main',
      component: Main,
      redirect:'/home',
      children:[
        {
          path: '/work/select',
          name: 'Select',
          component: Select
        },
        {
          path: '/message',
          name: 'Msg',
          component: Msg
        },
         {
          path: '/order',
          name: 'Order',
          component: Order
        },
        {
          path: '/home',
          name: 'Home',
          component: Home
        }
      ]
    }
  ]
})


